package LuceneIndexCreate.http;

import org.apache.http.HttpHost;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * Created by User on 2017/12/6.
 */
public class Host {

    public static List<HttpHost> squidHosts = new ArrayList<HttpHost>();
    public static int size = 0;
    static Random rand = new Random();
    static {
        squidHosts.add(new HttpHost("123.59.156.160", 3999));// uc02
        squidHosts.add(new HttpHost("123.59.146.204", 3999));// uc01
        squidHosts.add(new HttpHost("123.59.132.73", 3999));// uc03
        squidHosts.add(new HttpHost("123.59.89.146", 3999));// uc04
        squidHosts.add(new HttpHost("106.75.5.243", 3999));// uc10
        squidHosts.add(new HttpHost("106.75.3.33", 3999));// uc11
        squidHosts.add(new HttpHost("106.75.18.123", 3999));// uc12
        squidHosts.add(new HttpHost("106.75.16.78", 3999));// uc13
        squidHosts.add(new HttpHost("106.75.35.130", 3999));// uc14
        squidHosts.add(new HttpHost("115.29.11.100", 3999));// bbn40
        squidHosts.add(new HttpHost("112.124.18.136", 3999));// bbn38
        squidHosts.add(new HttpHost("115.29.244.183", 3999));// bbn39
        squidHosts.add(new HttpHost("121.199.28.225", 3999));// bbn36
        squidHosts.add(new HttpHost("115.29.244.136", 3999));// bbn34
        squidHosts.add(new HttpHost("115.29.162.137", 3999));// bbn33
        squidHosts.add(new HttpHost("115.29.193.58", 3999));// bbn31
        squidHosts.add(new HttpHost("112.124.43.119", 3999));// bbn32
        squidHosts.add(new HttpHost("115.29.161.96", 3999));// bbn30
        squidHosts.add(new HttpHost("115.29.162.138", 3999));// bbn29
        squidHosts.add(new HttpHost("115.29.175.97", 3999));// bbn26
        squidHosts.add(new HttpHost("112.124.6.50", 3999));// bbn24
        squidHosts.add(new HttpHost("121.199.0.70", 3999));// bbn10
        squidHosts.add(new HttpHost("121.40.43.205", 3999));// bbn09
        squidHosts.add(new HttpHost("121.40.42.170", 3999));// bbn08
        squidHosts.add(new HttpHost("121.40.42.202", 3999));// bbn06
        squidHosts.add(new HttpHost("121.40.43.163", 3999));// bbn04
        squidHosts.add(new HttpHost("42.121.136.84", 3999));// bbn03
        squidHosts.add(new HttpHost("42.121.112.102", 3999));// bbn02
        size = squidHosts.size();
    }

    public static HttpHost getHost() {
        return squidHosts.get(rand.nextInt(size));
    }

}
